package com.e3.core.base;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

public class AbstractSuperService {
	private SessionFactory sessionFactory;
	
	public void setSessionFactory(SessionFactory sessionFactory){
		this.sessionFactory = sessionFactory;
		DAOHelper.setSessionFactory(sessionFactory);
	}
	
	public SessionFactory getSessionFactory(){
		return this.sessionFactory;
	}
	
	public Session getCurrentSession(){
		return getSessionFactory().getCurrentSession();
	}
}
